package com.own.component.springdoc;

import com.own.component.springdoc.base.BaseSpringDocConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.springdoc.core.GroupedOpenApi;
import org.springframework.boot.SpringBootConfiguration;

/**
 * DefaultSpringDocConfiguration
 *
 * @author chenxueli
 * @date 2023-12-05 15:53:58
 */
@Slf4j
@SpringBootConfiguration
public class DefaultSpringDocConfiguration extends BaseSpringDocConfiguration {

    /**
     * 创建的springdoc信息
     *
     * @param groupName      分组名称
     * @param packagesToScan 扫描的包
     * @return 分组文档信息
     */
    @Override
    protected GroupedOpenApi defaultCreate(String groupName, String... packagesToScan) {
        return GroupedOpenApi.builder().group(groupName).packagesToScan(packagesToScan).build();
    }

}
